#include <stdio.h>
int main()
{	       	  
    long term = 0, sum = 0;
    int a , i, n;

    printf("Input a,n:\n");
    scanf("%d,%d", &a, &n);

    for (i = 1; i <= n; i++)//2
    {	       	  
        term = term * 10 + a;   //2
        sum = sum + term;          //2
    }
    printf("sum=%ld\n", sum);    //1

    return 0;
}